package main.java.FSMDE.models;

import java.util.UUID;

public class FactoryComponent {

	public static Component create(String componentName,
			ComponentType componentType) {

		switch (componentType) {
		case Heading:
		case Player:
		case Image:
		case URL:
		case Text:
		case RadioButton:
		case CheckBox:
		case Text_field:
		case Button: {
			return new Component(UUID.randomUUID(), componentName,
					componentType);
		}
		case Table:
		case Drop_Down_list:
		case Unsorted_List:
		case Slider:
		case Accordion:
		case Tab:
		case Section:
		case Generic: {
			return new ComplexComponent(UUID.randomUUID(), componentName,
					componentType);
		}
		case Form: {
			return new RelatedComponent(UUID.randomUUID(), componentName,
					componentType);
		}
		default:
			break;
		}
		return null;
	}

	private FactoryComponent() {
	}
}
